package com.example.agriapp.model.bean;

// FeedItem.java
public class FeedItem {
    private final String id;
    private final String userId;
    private final String username;
    private final String avatar;
    private final String content;
    private final String date;
    private int likes;
    private int comments;
    private final boolean hasShop;
    private boolean isFollowed;
    private final String tag;
    private final String imageUri;

    public FeedItem(String id, String userId, String username, String avatar,
                    String content, String date, int likes, int comments,
                    boolean hasShop, boolean isFollowed, String tag, String imageUri) {
        this.id = id;
        this.userId = userId;
        this.username = username;
        this.avatar = avatar;
        this.content = content;
        this.date = date;
        this.likes = likes;
        this.comments = comments;
        this.hasShop = hasShop;
        this.isFollowed = isFollowed;
        this.tag = tag;
        this.imageUri = imageUri;
    }

    // Getter方法
    public String getId() { return id; }
    public String getUserId() { return userId; }
    public String getUsername() { return username; }
    public String getAvatar() { return avatar; }
    public String getContent() { return content; }
    public String getDate() { return date; }
    public int getLikes() { return likes; }
    public int getComments() { return comments; }
    public boolean hasShop() { return hasShop; }
    public boolean isFollowed() { return isFollowed; }
    public String getTag() { return tag; }
    public String getImageUri() { return imageUri; }

    public boolean isHasShop() {
        return hasShop;
    }

    // Setter方法
    public void setLikes(int likes) { this.likes = likes; }
    public void setComments(int comments) { this.comments = comments; }
    public void setFollowed(boolean followed) { isFollowed = followed; }
}